import request from '@/utils/request.js';

// 通过常量的方式管理首页模块的接口地址
const HOSPITAL_URL = '/hosp/hospital';
// 获取医院等级或者地区的接口地址
const HOSPITAL_LEVEL_AND_REGION_URL = '/cmn/dict/findByDictCode/';
// 根据医院的名字获取医院信息
const HOSPITAL_INFO_URL = '/hosp/hospital/findByHosname/';

// 获取医院数据
export const reqHospital = (page, limit) => request.get(`${HOSPITAL_URL}/${page}/${limit}`);
// 获取医院的等级或者获取医院地区的数据
export const reqHospitalLevelAndRegion = (dictCod) => request.get(`${HOSPITAL_LEVEL_AND_REGION_URL}${dictCode}`);
// 根据关键字获取医院的数据进行展示
export const reqHospitalInfo = (hosname => request.get(`${HOSPITAL_INFO_URL}${hosname}`));
